package com.woniuxy.ticketcinema.serviec.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.ticketcinema.entity.TicketCinema;
import com.woniuxy.ticketcinema.mapper.CinemaMapper;
import com.woniuxy.ticketcinema.mapper.HallMapper;
import com.woniuxy.ticketcinema.mapper.ScheduleMapper;
import com.woniuxy.ticketcinema.serviec.CinemaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName CinemaServiceImpl
 * @Description TODO
 * @Author zx
 * @Date 2021-02-27 11:54:31
 * @Version 1.0
 */
@Service
public class CinemaServiceImpl extends ServiceImpl<CinemaMapper, TicketCinema> implements CinemaService {

    @Resource
    private CinemaMapper cinemaMapper;

    @Resource
    private HallMapper hallMapper;

    @Resource
    private ScheduleMapper scheduleMapper;



    @Override
    public Double findIdByName(String name,String hallName) {
        //查除价格
        return scheduleMapper.findMoneyById(hallMapper.findIdByCinemaIdAndName(cinemaMapper.findIdByName(name),hallName));
    }
}
